package com.bdqn.mapper;

import com.bdqn.pojo.Department;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DepartmentMapper {
    /**
     * 查询所有的科室信息
     * @return 科室集合
     */
    List<Department> select(String deptName);
    @Select("SELECT sD.dept_id, sD.dept_name , COUNT(hR.`dept_id`) AS 'currentNumber' FROM his_registration hR,sys_dept sD WHERE hR.`dept_id` = sD.`dept_id` GROUP BY hR.`dept_id`")
    List<Department> selectRegistrationList();
}
